<?php
/**
 * 淘宝接入
 */
@ini_set('display_errors',        2);
header("Content-type: text/html; charset=utf-8");
include dirname(__FILE__) . "/taobao/TopSdk.php";
//将下载SDK解压后top里的TopClient.php第8行$gatewayUrl的值改为沙箱地址:http://gw.api.tbsandbox.com/router/rest,
//正式环境时需要将该地址设置为:http://gw.api.taobao.com/router/rest
//实例化TopClient类
$c = new TopClient;
// $c->appkey = "23067241";
// $c->secretKey = "a88a12ab5528318611c1af8c98ce6947";
// $sessionkey= "6101827ecd654d89eccfe7d8780cfd12eaa19ff03fb9dff2101979874";   //如沙箱测试帐号sandbox_c_1授权后得到的sessionkey
$c->appkey = "1023067241";
$c->secretKey = "sandboxb5528318611c1af8c98ce6947";
$sessionkey= "6101827ecd654d89eccfe7d8780cfd12eaa19ff03fb9dff2101979874";   //如沙箱测试帐号sandbox_c_1授权后得到的sessionkey
//实例化具体API对应的Request类
$req = new UserSellerGetRequest;
$req->setFields("nick,user_id,type");
//$req->setNick("sandbox_c_1");

//执行API请求并打印结果
$resp = (array)$c->execute($req,$sessionkey);
echo "<pre>";
print_r($resp);
echo "</pre>";
exit;
?>